package com.hhj.sell.controller;

import com.hhj.sell.dto.OrderDTO;
import com.hhj.sell.enums.ResultEnums;
import com.hhj.sell.exception.SellException;
import com.hhj.sell.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
@RequestMapping
public class PayCtroller {
    @Autowired
    private OrderService orderService;
    public void create(@RequestParam String orderId,
                               @RequestParam String returnurl) {
        //1. 查询订单
        OrderDTO orderDTO = orderService.findById(orderId);
        if (orderDTO == null) {
            throw new SellException(ResultEnums.ORDERMATER_NOT_EXIST);
        }
    }
}
